<?php $errorMsg="";if(!($filename=filter_input(INPUT_POST,'name',FILTER_UNSAFE_RAW))||!is_scalar($filename)){$errorMsg='错误的数据包文件名';}else{$archive=new Zmsun\Copen\DataPackageArchive($this->serviceManager,new Zmsun\Copen\OpenLib($this->serviceManager->get("Database"),$this->serviceManager->get("DBTablePrefix")));$archive->apply($filename,$errorMsg);}echo json_encode(array('status'=>$errorMsg ?'error':'ok','info'=>$errorMsg));